package com.care.doctor.server.controller;

import com.care.common.core.domain.Result;
import com.care.doctor.server.service.LabelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: 靳家振
 * @Date: 2024/3/26 09:33
 * @Description:
 **/

@RestController
@RequestMapping("/label")
public class LabelController {
    @Autowired
    private LabelService labelService;

    @GetMapping("/listAll")
    public Result listAll(){
        return labelService.listAll();
    }

    @PostMapping("/listById/{departmentId}")
    public Result listById(@PathVariable("departmentId") Integer departmentId){
        return labelService.listById(departmentId);
    }

    @GetMapping("/findByLabelId/{labelId}")
    public Result findByLabelId(@PathVariable("labelId") Integer labelId){
        return labelService.findByLabelId(labelId);
    }
}
